import request from '@/utils/request'

export function selectList(params) {
  return request({
    url: '/api/readermagazine/list',
    method: 'get',
    params
  })
}
//回显杂志内容
export function getMagazineById(param) {
  return request({
    url: '/api/readermagazine/update_view/'+param,
    method: 'get'
  })
}
//新建杂志
export function insertMagazine(data) {
  return request({
    url: '/api/readermagazine/insert',
    method: 'post',
    data: data
  })
}

//新建杂志
export function updateMagazine(data) {
  return request({
    url: '/api/readermagazine/update',
    method: 'post',
    data: data
  })
}

//删除杂志
export function deleteMagazine(data) {
  return request({
    url: '/api/readermagazine/delete',
    method: 'post',
    data: data
  })
}
//批量删除杂志
export function deleteMagazines(data) {
  return request({
    url: '/api/readermagazine/deleteIds',
    method: 'post',
    data: data
  })
}
//查询单期杂志内容列表
export function getOnlyMagazineContents(params) {
  return request({
    url: '/api/readermagazinecontent/list',
    method: 'get',
    params
  })
}
